# Copyright (c) 2010-2025, Lawrence Livermore National Security, LLC. Produced
# at the Lawrence Livermore National Laboratory. All Rights reserved. See files
# LICENSE and NOTICE for details. LLNL-CODE-806117.
#
# This file is part of the MFEM library. For more information and source code
# availability visit https://mfem.org.
#
# MFEM is free software; you can redistribute it and/or modify it under the
# terms of the BSD-3 license. We welcome feedback and contributions, see file
# CONTRIBUTING.md for details.

set(SRCS
  bilinearform.cpp
  bilinearform_ext.cpp
  bilininteg.cpp
  integ/bilininteg_br2.cpp
  integ/bilininteg_convection_mf.cpp
  integ/bilininteg_convection_pa.cpp
  integ/bilininteg_convection_ea.cpp
  integ/bilininteg_curlcurl_pa.cpp
  integ/bilininteg_dgdiffusion_pa.cpp
  integ/bilininteg_dgtrace_pa.cpp
  integ/bilininteg_dgtrace_ea.cpp
  integ/bilininteg_diffusion_mf.cpp
  integ/bilininteg_diffusion_pa.cpp
  integ/bilininteg_diffusion_ea.cpp
  integ/bilininteg_diffusion_patch.cpp
  integ/bilininteg_divdiv_pa.cpp
  integ/bilininteg_elasticity_ea.cpp
  integ/bilininteg_elasticity_pa.cpp
  integ/bilininteg_gradient_pa.cpp
  integ/bilininteg_interp_pa.cpp
  integ/bilininteg_mass_mf.cpp
  integ/bilininteg_mass_pa.cpp
  integ/bilininteg_mass_ea.cpp
  integ/bilininteg_mixedcurl_pa.cpp
  integ/bilininteg_mixedvecgrad_pa.cpp
  integ/bilininteg_trace_jump_ea.cpp
  integ/bilininteg_transpose_ea.cpp
  integ/bilininteg_vecdiffusion_mf.cpp
  integ/bilininteg_vecdiffusion_pa.cpp
  integ/bilininteg_vecdiv_pa.cpp
  integ/bilininteg_vecmass_mf.cpp
  integ/bilininteg_vecmass_pa.cpp
  integ/bilininteg_vectorfediv_pa.cpp
  integ/bilininteg_vectorfemass_pa.cpp
  integ/bilininteg_diffusion_kernels.cpp
  integ/bilininteg_elasticity_kernels.cpp
  integ/bilininteg_hcurl_kernels.cpp
  integ/bilininteg_hdiv_ea.cpp
  integ/bilininteg_hdiv_kernels.cpp
  integ/bilininteg_hcurlhdiv_kernels.cpp
  integ/bilininteg_mass_kernels.cpp
  integ/lininteg_boundary.cpp
  integ/lininteg_boundary_flux.cpp
  integ/lininteg_domain.cpp
  integ/lininteg_domain_grad.cpp
  integ/lininteg_domain_vectorfe.cpp
  integ/nonlininteg_vecconvection_pa.cpp
  integ/nonlininteg_vecconvection_mf.cpp
  coefficient.cpp
  complex_fem.cpp
  convergence.cpp
  datacollection.cpp
  dgmassinv.cpp
  doftrans.cpp
  dfem/doperator.cpp
  eltrans.cpp
  batchitrans.cpp
  estimators.cpp
  fe.cpp
  fe/face_map_utils.cpp
  fe/fe_base.cpp
  fe/fe_fixed_order.cpp
  fe/fe_h1.cpp
  fe/fe_l2.cpp
  fe/fe_nd.cpp
  fe/fe_nurbs.cpp
  fe/fe_pos.cpp
  fe/fe_pyramid.cpp
  fe/fe_rt.cpp
  fe/fe_ser.cpp
  fe_coll.cpp
  fespace.cpp
  derefmat_op.cpp
  pderefmat_op.cpp
  geom.cpp
  gridfunc.cpp
  hybridization.cpp
  hybridization_ext.cpp
  intrules.cpp
  intrules_cut.cpp
  ceed/interface/basis.cpp
  ceed/interface/restriction.cpp
  ceed/interface/operator.cpp
  ceed/interface/util.cpp
  ceed/integrators/convection/convection.cpp
  ceed/integrators/diffusion/diffusion.cpp
  ceed/integrators/nlconvection/nlconvection.cpp
  ceed/integrators/mass/mass.cpp
  ceed/solvers/algebraic.cpp
  ceed/solvers/full-assembly.cpp
  ceed/solvers/solvers-atpmg.cpp
  kdtree.cpp
  linearform.cpp
  linearform_ext.cpp
  lininteg.cpp
  lor/lor.cpp
  lor/lor_ads.cpp
  lor/lor_ams.cpp
  lor/lor_batched.cpp
  multigrid.cpp
  nonlinearform.cpp
  nonlinearform_ext.cpp
  nonlininteg.cpp
  fespacehierarchy.cpp
  qfunction.cpp
  qinterp/det.cpp
  qinterp/eval_by_nodes.cpp
  qinterp/eval_by_vdim.cpp
  qinterp/eval_hdiv.cpp
  qinterp/grad_by_nodes.cpp
  qinterp/grad_by_vdim.cpp
  qspace.cpp
  quadinterpolator.cpp
  quadinterpolator_face.cpp
  restriction.cpp
  normal_deriv_restriction.cpp
  staticcond.cpp
  tmop.cpp
  tmop/pa.cpp
  tmop/assemble/diag2_limit.cpp
  tmop/assemble/diag2.cpp
  tmop/assemble/grad2_limit.cpp
  tmop/assemble/grad2.cpp
  tmop/assemble/diag3_limit.cpp  
  tmop/assemble/diag3.cpp
  tmop/assemble/grad3_limit.cpp
  tmop/assemble/grad3.cpp
  tmop/metrics/001.cpp
  tmop/metrics/002.cpp
  tmop/metrics/007.cpp
  tmop/metrics/056.cpp
  tmop/metrics/077.cpp
  tmop/metrics/080.cpp
  tmop/metrics/094.cpp
  tmop/metrics/302.cpp
  tmop/metrics/303.cpp
  tmop/metrics/315.cpp
  tmop/metrics/318.cpp
  tmop/metrics/321.cpp
  tmop/metrics/332.cpp
  tmop/metrics/338.cpp
  tmop/mult/grad2_limit.cpp
  tmop/mult/grad2.cpp
  tmop/mult/mult2_limit.cpp
  tmop/mult/mult2.cpp
  tmop/mult/grad3_limit.cpp
  tmop/mult/grad3.cpp
  tmop/mult/mult3_limit.cpp
  tmop/mult/mult3.cpp
  tmop/tools/det2_jpr.cpp
  tmop/tools/det3_jpr.cpp
  tmop/tools/discrete.cpp
  tmop/tools/energy2_limit.cpp
  tmop/tools/energy2.cpp
  tmop/tools/energy3_limit.cpp
  tmop/tools/energy3.cpp
  tmop/tools/target2.cpp
  tmop/tools/target3.cpp
  tmop_tools.cpp
  tmop_amr.cpp
  gslib.cpp
  gslib/findpts_local_2.cpp
  gslib/findpts_local_3.cpp
  gslib/interpolate_local_2.cpp
  gslib/interpolate_local_3.cpp
  transfer.cpp
  hyperbolic.cpp
  integrator.cpp
  bounds.cpp
  particleset.cpp
  )

set(HDRS
  bilinearform.hpp
  bilinearform_ext.hpp
  bilininteg.hpp
  integ/lininteg_domain_kernels.hpp
  integ/bilininteg_dgdiffusion_kernels.hpp
  integ/bilininteg_dgtrace_kernels.hpp
  integ/bilininteg_vecdiffusion_kernels.hpp
  integ/bilininteg_convection_kernels.hpp
  integ/bilininteg_diffusion_kernels.hpp
  integ/bilininteg_elasticity_kernels.hpp
  integ/bilininteg_hcurl_kernels.hpp
  integ/bilininteg_hdiv_kernels.hpp
  integ/bilininteg_hcurlhdiv_kernels.hpp
  integ/bilininteg_mass_kernels.hpp
  integ/bilininteg_vecdiffusion_pa.hpp
  integ/bilininteg_vecmass_pa.hpp
  coefficient.hpp
  complex_fem.hpp
  convergence.hpp
  datacollection.hpp
  dgmassinv.hpp
  dgmassinv_kernels.hpp
  doftrans.hpp
  dfem/doperator.hpp
  dfem/fieldoperator.hpp
  dfem/integrate.hpp
  dfem/parameterspace.hpp
  dfem/qfunction_apply.hpp
  dfem/qfunction_transform.hpp
  dfem/tuple.hpp
  dfem/util.hpp
  eltrans.hpp
  estimators.hpp
  fe.hpp
  fe/face_map_utils.hpp
  fe/fe_base.hpp
  fe/fe_fixed_order.hpp
  fe/fe_h1.hpp
  fe/fe_l2.hpp
  fe/fe_nd.hpp
  fe/fe_nurbs.hpp
  fe/fe_pos.hpp
  fe/fe_pyramid.hpp
  fe/fe_rt.hpp
  fe/fe_ser.hpp
  fe_coll.hpp
  fem.hpp
  fespace.hpp
  geom.hpp
  gridfunc.hpp
  hybridization.hpp
  hybridization_ext.hpp
  intrules.hpp
  intrules_cut.hpp
  kernel_dispatch.hpp
  kernel_reporter.hpp
  kernels.hpp
  ceed/interface/basis.hpp
  ceed/interface/integrator.hpp
  ceed/interface/interface.hpp
  ceed/interface/operator.hpp
  ceed/interface/restriction.hpp
  ceed/interface/util.hpp
  ceed/integrators/convection/convection.hpp
  ceed/integrators/diffusion/diffusion.hpp
  ceed/integrators/mass/mass.hpp
  ceed/integrators/nlconvection/nlconvection.hpp
  ceed/interface/coefficient.hpp
  ceed/solvers/algebraic.hpp
  ceed/solvers/full-assembly.hpp
  ceed/solvers/solvers-atpmg.hpp
  kdtree.hpp
  linearform.hpp
  linearform_ext.hpp
  lininteg.hpp
  lor/lor.hpp
  lor/lor_ads.hpp
  lor/lor_ams.hpp
  lor/lor_batched.hpp
  lor/lor_h1.hpp
  lor/lor_dg.hpp
  lor/lor_nd.hpp
  lor/lor_rt.hpp
  lor/lor_h1_impl.hpp
  lor/lor_dg_impl.hpp
  lor/lor_nd_impl.hpp
  lor/lor_rt_impl.hpp
  lor/lor_util.hpp
  multigrid.hpp
  nonlinearform.hpp
  nonlinearform_ext.hpp
  nonlininteg.hpp
  qfunction.hpp
  qinterp/det.hpp
  qinterp/eval.hpp
  qinterp/eval_hdiv.hpp
  qinterp/grad.hpp
  qspace.hpp
  quadinterpolator.hpp
  quadinterpolator_face.hpp
  restriction.hpp
  normal_deriv_restriction.hpp
  fespacehierarchy.hpp
  staticcond.hpp
  tbilinearform.hpp
  tbilininteg.hpp
  tcoefficient.hpp
  teltrans.hpp
  tevaluator.hpp
  tfe.hpp
  tfespace.hpp
  tintrules.hpp
  tmop.hpp
  tmop/pa.hpp
  tmop/assemble/grad2.hpp
  tmop/assemble/grad2.hpp
  tmop/mult/mult2.hpp
  tmop/mult/mult3.hpp
  tmop/tools/energy2.hpp
  tmop_tools.hpp
  tmop_amr.hpp
  gslib.hpp
  transfer.hpp
  hyperbolic.hpp
  integrator.hpp
  bounds.hpp
  particleset.hpp
  )

if (MFEM_USE_SIDRE)
  list(APPEND SRCS sidredatacollection.cpp)
  list(APPEND HDRS sidredatacollection.hpp)
endif()

if (MFEM_USE_CONDUIT)
  list(APPEND SRCS conduitdatacollection.cpp)
  list(APPEND HDRS conduitdatacollection.hpp)
endif()

if (MFEM_USE_ADIOS2)
  list(APPEND SRCS adios2datacollection.cpp)
  list(APPEND HDRS adios2datacollection.hpp)
endif()

if (MFEM_USE_FMS)
  list(APPEND SRCS fmsdatacollection.cpp fmsconvert.cpp)
  list(APPEND HDRS fmsdatacollection.hpp fmsconvert.hpp)
endif()

if (MFEM_USE_MPI)
  list(APPEND SRCS
    pbilinearform.cpp
    pfespace.cpp
    pgridfunc.cpp
    plinearform.cpp
    pnonlinearform.cpp
    prestriction.cpp)
  # If this list (HDRS -> HEADERS) is used for install, we probably want the
  # headers added all the time.
  list(APPEND HDRS
    pbilinearform.hpp
    pfespace.hpp
    pgridfunc.hpp
    plinearform.hpp
    pnonlinearform.hpp
    prestriction.hpp)
endif()

convert_filenames_to_full_paths(SRCS)
convert_filenames_to_full_paths(HDRS)

set(SOURCES ${SOURCES} ${SRCS} PARENT_SCOPE)
set(HEADERS ${HEADERS} ${HDRS} PARENT_SCOPE)
